/**
 * 3. 预习数组遍历方法

    forEach
       遍历数组元素

    map

    filter
       => 遍历数组，查找所有满足条件的元素

    find

    every

    some
 */
const students = [
	{ number: 1001, name: 'jack', score: 98, gender: '男' },
	{ number: 1002, name: 'rose', score: 95, gender: '女' },
	{ number: 1003, name: '小丽', score: 85, gender: '女' },
]

students.forEach((item, index) => console.log(item, index))

const stu1 = students.find(function(item,index){
    return item.score > 95
})
const stu = students.find((item)=>item.score > 95)
console.log(stu);

const  newStudents = students.filter(item=>item.score > 90)
/*
[{ number: 1001, name: 'jack', score: 98, gender: '男' },
	{ number: 1002, name: 'rose', score: 95, gender: '女' },]
*/

